Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix project artifact sharing. #1442

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

jbaiera
Copy link
Member

@jbaiera jbaiera commented Mar 17, 2020

Use a configuration to embed the contents of the mr project into dependent
projects' artifacts instead of using the mr project's jar task directly.

Consolidate all projects' dependency blocks into one block for each project.

Embed the MR project into dependent projects by depending on the project
and embedding its contents into the jar using the configuration instead
of the project's jar task.
canBeResolved = true
}
implementation {
extendsFrom project.configurations.embedded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should change the canBeResolved for the implementation configuration. See https://discuss.gradle.org/t/what-is-a-configuration-which-cant-be-directly-resolved/30721/2

In short, you should never change the canBeConsumed and canBeResolved flags of configuration you do not create.

also, it's not clear you are changing it ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation shouldn't be affected by that at all. Only the embedded configuration is getting canBeResolved set on it. The implementation configuration just depends on it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok , i mis-understood how extendsFrom behaves

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jbaiera jbaiera merged commit b34e112 into elastic:master Mar 19, 2020
@jbaiera jbaiera deleted the fix-project-artifact-sharing branch March 19, 2020 17:21
jbaiera added a commit that referenced this pull request May 13, 2020
Embed the MR project into dependent projects by depending on the project
and embedding its contents into the jar using the configuration instead
of the project's jar task.
@jbaiera
Copy link
Member Author

jbaiera commented Jul 14, 2020

Relates #1423

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants